package com.ruoyi.edh.domain.vo;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;

/**
 *
 *
 * @description: 订单列表Excle vo
 * @author: 梁东宸
 * @time: 2020/9/14 11:01 上午
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("易订购-订单")
public class EdhSummaryOrderExcleListVo extends BaseEntity {
    private static final long serialVersionUID = 1L;


    /** uuid */
    @ApiModelProperty("${comment}")
    private Long id;


    /** 订单号 */
    @Excel(name = "订单号")
    @ApiModelProperty("订单号")
    private String orderNo;



    /** 商品名称 */
    @Excel(name = "商品名称")
    @ApiModelProperty("商品名称")
    private String goodsName;




    /** 订单金额 只对于当前子订单的订单金额 */
    @Excel(name = "订单金额")
    @ApiModelProperty("订单金额 只对于当前子订单的订单金额")
    private BigDecimal orderAmount;


    /** 实收金额 只针对于当前子订单实收金额 */
    @Excel(name = "实收金额")
    @ApiModelProperty("实收金额 只针对于当前子订单实收金额")
    private BigDecimal actualAmount;


    /** 支付类型 0支付宝/1微信支付/2余额支付 */
    @Excel(name = "支付类型")
    @ApiModelProperty("支付类型 0支付宝/1微信支付/2余额支付")
    private String paymentType;



    /** 订单状态 0正常/1已付款/2待收货/3已完成/4已取消/5退款退货 */
    @Excel(name = "订单状态")
    @ApiModelProperty("订单状态 0待付款/1已付款/2待收货/3已完成/4已取消/5退款退货")
    private String orderStatus;
    /** 发货状态*/
    @Excel(name = "发货状态")
    @ApiModelProperty("发货状态 0未发货/1已发货")
    private String shipStatus;

    /** 用户名称 */
    @Excel(name = "用户名称")
    @ApiModelProperty("用户名称")
    private String userName;
    @Excel(name = "手机号")
    /** 手机号 */
    @ApiModelProperty("手机号")
    private String phone;

    /** 地址 */
    @ApiModelProperty("地址")
    private String address;

    /** 用户是否为团长 */
    @Excel(name = "用户类型")
    @ApiModelProperty("用户是否为团长")
    private String teamLeader;

    @ApiModelProperty("订单备注")
    private String remarks;


    public void setPaymentType(String paymentType) {
        switch (paymentType){
            case "0":
                this.paymentType="支付宝" ;
                break;
            case "1":
                this.paymentType="微信支付" ;
                break;
            case "2":
                this.paymentType="余额支付" ;
                break;
            default:
                break;
        }

    }

    public void setOrderStatus(String orderStatus) {
        switch (paymentType){
            case "0":
                this.orderStatus="待付款" ;
                break;
            case "1":
                this.orderStatus="已付款" ;
                break;
            case "2":
                this.orderStatus="待收货" ;
                break;
            case "3":
                this.orderStatus="已完成" ;
                break;
            case "4":
                this.orderStatus="已取消" ;
                break;
            case "5":
                this.orderStatus="待处理退货";
                break;
            case "6":
                this.orderStatus="待确认退货";
                break;
            default:
                break;
        }
    }

    public void setShipStatus(String shipStatus) {
        switch (shipStatus){
            case "0":
                this.shipStatus="未发货" ;
                break;
            case "1":
                this.shipStatus="已发货" ;
                break;
            default:
                break;
        }
    }

    public void setTeamLeader(String teamLeader) {
        switch (shipStatus){
            case "0":
                this.teamLeader="普通用户" ;
                break;
            case "1":
                this.teamLeader="团长" ;
                break;
            default:
                break;
        }
    }
}
